/*
* Copyright (C) 2006 Jordi Marquès Ferré
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file DUROTY.txt.
*
* Author: Jordi Marquès Ferré
* c/Mallorca 295 principal B 08037 Barcelona Spain
* Phone: +34 625397324
*/


package com.duroty.hibernate;


// Generated 02-ago-2006 17:07:31 by Hibernate Tools 3.1.0.beta5

/**
 * LabMesId generated by hbm2java
 */
public class LabMesId implements java.io.Serializable {
    // Fields    

    /**
     *
     */
    private static final long serialVersionUID = 5064021336237559431L;

    /**
     * DOCUMENT ME!
     */
    private Message message;

    /**
     * DOCUMENT ME!
     */
    private Label label;

    // Constructors

    /** default constructor */
    public LabMesId() {
    }

    /** full constructor */
    public LabMesId(Message message, Label label) {
        this.message = message;
        this.label = label;
    }

    // Property accessors
    public Message getMessage() {
        return this.message;
    }

    /**
     * DOCUMENT ME!
     *
     * @param message DOCUMENT ME!
     */
    public void setMessage(Message message) {
        this.message = message;
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public Label getLabel() {
        return this.label;
    }

    /**
     * DOCUMENT ME!
     *
     * @param label DOCUMENT ME!
     */
    public void setLabel(Label label) {
        this.label = label;
    }

    /**
     * DOCUMENT ME!
     *
     * @param other DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public boolean equals(Object other) {
        if ((this == other)) {
            return true;
        }

        if ((other == null)) {
            return false;
        }

        if (!(other instanceof LabMesId)) {
            return false;
        }

        LabMesId castOther = (LabMesId) other;

        return ((this.getMessage() == castOther.getMessage()) ||
        ((this.getMessage() != null) && (castOther.getMessage() != null) &&
        this.getMessage().equals(castOther.getMessage()))) &&
        ((this.getLabel() == castOther.getLabel()) ||
        ((this.getLabel() != null) && (castOther.getLabel() != null) &&
        this.getLabel().equals(castOther.getLabel())));
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public int hashCode() {
        int result = 17;

        result = (37 * result) +
            ((getMessage() == null) ? 0 : this.getMessage().hashCode());
        result = (37 * result) +
            ((getLabel() == null) ? 0 : this.getLabel().hashCode());

        return result;
    }
}
